/-docs
/-editor
CodeMirrorEditor.ts
CompletionCodeMirrorEditor.ts
CssEditorType.ts
Editor.ts
EditorType.ts
HtmlEditorType.ts
JavaScriptEditorType.ts
TypeScriptEditorType.ts
x-last-PlainTextEditorType.ts
/-files
/-files-old
/-imports
/-layout
/-storage
/-tests ...
/-tests/files
/-tests/storage
TestCase.html
TestCase.ts
TestPage.css
TestPage.html
TestPage.ts
_sampleTests.ts
teapo-tests.html
teapo-tests.ts
/-typings
codemirror.d.ts
knockout.d.ts
typescriptServices.d.ts
websql.d.ts
zip.js.d.ts
TypeScriptService.ts
functions.ts
ko.ts
persistence.api.ts
persistence.ts
shell.ts
teapo.html
teapo.ts
x
 
38
    }
39
40
    private _startSync() {
41
42
      this.state(TestCase.State.Running);
43
      this.runtime(0);
44
      this._started = dateNow();
45
46
      var failure: Error;
47
      var failed = false;
48
      try {
49
        this._test.apply(this._this_);
50
      }
51
      catch (error) {
52
        failed = true;
53
        failure = error;
54
      }
55
56
      this.runtime(dateNow() - this._started);
57
58
      if (failed) {
59
        this.failure(failure);
60
        this.state(TestCase.State.Failed);
61
      }
62
      else {
63
        this.state(TestCase.State.Succeeded);
64
      }
65
    }
66
67
    private _startAsync(callback?: () => void) {
68
      this.state(TestCase.State.Running);
69
      this.runtime(0);
70
      this._started = dateNow();
71
72
                        
73
      var failure: Error;
74
      var failedSynchrously = false;
75
      try {
76
        this._test.apply(this._this_, [(failure?) => {
77
78
          this.runtime(dateNow() - this._started);
79
80
          if (failure) {
81
            this.failure(failure);
82
            this.state(TestCase.State.Failed);
83
          }
84
          else {
85
            this.state(TestCase.State.Succeeded);
86
          }
87
88
          if (callback)
89
            callback();
90
        }]);
91
      }
92
      catch (error) {
93
        failedSynchrously = true;
94
        failure = error;
95
      }
96
97
      this.runtime(dateNow() - this._started);
98
99
      if (failedSynchrously) {
100
        this.failure(failure);
101
        this.state(TestCase.State.Failed);
102
103
        if (callback)
104
          callback();
105
      }
106
    }
107
  }
55:26 function (): number